Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

streamifier

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

streamifier

Converts a Buffer/String into a readable stream

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
111K
decreased by-44.21%
Maintainers
1
Weekly downloads
 
Created

What is streamifier?

The streamifier npm package allows you to convert various data types into Node.js streams. This can be particularly useful for handling data in a streaming fashion, which can be more efficient and scalable than working with large data sets in memory.

What are streamifier's main functionalities?

Convert Buffer to Stream

This feature allows you to convert a Buffer into a readable stream. The code sample demonstrates creating a stream from a Buffer and piping it to the standard output.

const streamifier = require('streamifier');
const buffer = Buffer.from('Hello, World!');
const stream = streamifier.createReadStream(buffer);
stream.pipe(process.stdout);

Convert String to Stream

This feature allows you to convert a string into a readable stream. The code sample demonstrates creating a stream from a string and piping it to the standard output.

const streamifier = require('streamifier');
const string = 'Hello, World!';
const stream = streamifier.createReadStream(string);
stream.pipe(process.stdout);

Convert Array to Stream

This feature allows you to convert an array into a readable stream. The code sample demonstrates creating a stream from an array and writing each chunk to the standard output.

const streamifier = require('streamifier');
const array = ['Hello', ' ', 'World', '!'];
const stream = streamifier.createReadStream(array);
stream.on('data', (chunk) => {
  process.stdout.write(chunk);
});

Other packages similar to streamifier

Keywords

FAQs

Package last updated on 03 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc